<template>
  <div
    class="tankuang"
  >
    <div class="tankuang-main">
      <div class="title">备注打印机</div>
      <div class="content">
        <input type="text" v-model="dayijiName">
      </div>
      <div class="tankuang-caozuo">
        <a
          style="color: #373E4F;float: left;border-right: 0.5px solid #E8EAF0"
          @click="doCancle"
        >取消</a>
        <a
          style="color: #0077FF;float: right"
          @click="doConfirm"
        >确定</a>
      </div>
    </div>
    <mytoast ref="mytoast" />
  </div>
</template>

<script>
    import check from "@/utils/check";
    import mytoast from "@/components/toast";

    export default {
        components: { mytoast },

        props: ["currentPrint"],
  data() {
    return {
      isShow: false,
        dayijiName:''

    };
  },

    created(){
      this.dayijiName = this.currentPrint.aliasName;
    },

  methods: {

    doCancle() {
      this.$emit("doCancle");
    },
    doConfirm() {
        if(check.isNull(this.dayijiName)){
            this.$emit("doWarn","请输入打印机名称");
            return;
        }
        var print = this.currentPrint;
        print.aliasName = this.dayijiName;
        this.$emit("doConfirm",print);
    }
  }
};
</script>

<style scoped>
.tankuang-main {
  width: 80%;
  height: 120px;
  position: absolute;
  top: 40%;
  left: 10%;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 25px;
  z-index: 100;
  text-align: center;
}

.title {
  height: 40px;
  font-size: 18px;
  font-family: PingFang-SC-Bold;
  font-weight: bold;
  color: #373e4f;
  line-height: 40px;
}

.content {
  vertical-align: top;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content span {
  font-size: 12px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #373e4f;
  line-height: 40px;
}

.content img {
  height: 25px;
  width: 25px;
  margin-right: 5px;
}

.tankuang-caozuo {
  height: 40px;
  line-height: 40px;
  display: flex;
}

.tankuang-caozuo a {
  display: inline-block;
  width: 50%;
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 500;
  line-height: 50px;
  height: 40px;
  line-height: 40px;
  border-top: 0.5px solid #e8eaf0;
}

.tankuang {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 23, 50, 0.5);
  /* opacity: 0.5; */
  z-index: 99;
}
</style>
